from fastapi import FastAPI
from routers import mail, im_robot, oppsync
from appConfig import appConfig


appConfig()

# 初始化FastAPI应用
app = FastAPI()
app.include_router(mail.router)
# 量子密信bot
app.include_router(im_robot.router)  # 新增路由
# 商机同步接口
app.include_router(oppsync.router)

@app.get("/health")
async def health_check():
    """
    健康检查API端点，用于监控服务状态
    
    返回:
        服务状态信息
    """
    return {"status": "healthy"}



if __name__ == '__main__':
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8087)
